unit uInitPublic;

interface

uses
  uCommon, uTaskFile, uSMART;

function InitTaskFile(): Boolean;

function InitMyPublic(): Boolean;

procedure FreeMyPublic;

implementation

function InitTaskFile(): Boolean;
begin
  TaskFile := TTaskFile.Create(BasePort, AltPort);
  SMART := TSMART.Create;
  Result := TaskFile.DrvLoaded;
end;

function InitMyPublic(): Boolean;
begin
  InitIniFile;
  Result := InitTaskFile;
end;

procedure FreeMyPublic;
begin
  if Assigned(MyIniFile) then
  begin
    SaveIniFile;
    MyIniFile.Free;
  end;
  if Assigned(TaskFile) then
  begin
    SMART.Free;
    TaskFile.Free;
  end;
end;

end.
